package com.example.project_springboot.exception;

import com.example.project_springboot.pojo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalException {
    @ExceptionHandler(Exception.class)
    public Result exception(Exception e){
        e.printStackTrace();
        return Result.error("蔡徐坤先生你好！查询到你有犯罪记录！请联系公安部门！ 自首 !");
    }
}
